<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title>麦味·我的订单</title>
    <meta name="description" content="">
    <meta name="keywords" content="">


    <link href="/https://fonts.googleapis.com/css?family=Work+Sans:300,400,700" rel="stylesheet">

    <link rel="stylesheet" href="/assets/css/bootstrap/bootstrap.css">
    <link rel="stylesheet" href="/assets/css/animate.css">
    <link rel="stylesheet" href="/assets/fonts/ionicons/css/ionicons.min.css">

    <link rel="stylesheet" href="/assets/css/owl.carousel.min.css">

    <link rel="stylesheet" href="/assets/fonts/flaticon/font/flaticon.css">

    <link rel="stylesheet" href="/assets/fonts/fontawesome/css/font-awesome.min.css">

    <link rel="stylesheet" href="/assets/css/select2.css">


    <link rel="stylesheet" href="/assets/css/helpers.css">
    <link rel="stylesheet" href="/assets/css/style.css">

    <style type="text/css">
        table, th, td {
            border: 1px solid #E4E4E4;
        }

        table {
            width: 100%;
        }

        a.ex2:hover, a.ex2:active {
            color: #149d5b;
            font-size: 120%;
        }
    </style>

</head>
<tr>


<nav class="navbar navbar-expand-lg navbar-dark probootstrap_navbar" id="probootstrap-navbar">
    <div class="container">
        <a class="navbar-brand" href="/index">My Way</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#probootstrap-menu"
                aria-controls="probootstrap-menu" aria-expanded="false" aria-label="Toggle navigation">
            <span><i class="ion-navicon"></i></span>
        </button>
        <div class="collapse navbar-collapse" id="probootstrap-menu">
            <ul class="navbar-nav ml-auto">
                <li class="nav-item"><a class="nav-link" href="/index">首页</a></li>
                <li class="nav-item active"><a class="nav-link" id="order">我的订单</a></li>
                <li class="nav-item" ><a class="nav-link" href="/enter" id="denglu">登录</a></li>
                <li class="nav-item"><a class="nav-link" href="/register" id="zhuce">注册</a></li>
<!--                <script>
                    var name="uName";//Cookies名字
                    GetCookie = function(name) {
                        var ck = document.cookie;
                        var exp1 = new RegExp(name + "=.*?(?=;|$)");
                        var mch = ck.match(exp1);
                        return mch ? unescape(mch[0].substring(name.length + 1)) : null;
                    }
                    if(GetCookie(name)==null)
                    {
                        alert("您还没登录");
                        window.location.href="http://localhost:8280/enter";
                    }
                </script>-->
                <script>
                    var name="uName";//Cookies名字
                    this.GetCookie = function(name) {
                        var ck = document.cookie;
                        var exp1 = new RegExp(name + "=.*?(?=;|$)");
                        var mch = ck.match(exp1);
                        return mch ? unescape(mch[0].substring(name.length + 1)) : null;
                    }
                    if(GetCookie(name)!=null){
                        document.getElementById("denglu").innerText="您好，"+GetCookie(name);
                        document.getElementById("denglu").removeAttribute("href");
                        document.getElementById("zhuce").innerText="退出登录";
                        document.getElementById("zhuce").href="/enter/logout";}
                </script>
            </ul>
        </div>
    </div>
</nav>
<!-- END nav -->


<section class="probootstrap-cover overflow-hidden relative" style="background-image: url('/assets/images/bg_1.jpg');"
         data-stellar-background-ratio="0.5" id="section-home">
    <div class="overlay"></div>
    <div class="container">
        <!-- <div class="row align-items-center"> -->
        <!-- <div class="col-md"> -->


        <h2 class="display-4 border-bottom probootstrap-section-heading text-center">我的订单</h2>


        <div class="media probootstrap-media d-flex align-items-stretch mb-4 probootstrap-animate fadeInUp probootstrap-animated">

            <div class="media-body">
                <table>
                    <tr>
                    <th>酒店名</th>
                    <th>房型</th>
                    <th class="text-center">入住</th>
                    <th class="text-center">离店</th>
                    <th class="text-center">间数</th>
                    <th class="text-center">总价</th>
                    <th class="text-center">状态</th>
                    <th class="text-center">详情</th>
                    </tr>
                    <tr th:each="r_order : ${orders}" >
                        <td th:text="${r_order.hotelName}"></td>
                        <td th:text="${r_order.roomType}"></td>
                        <td class="text-center" th:text="${r_order.arrDateStr}"></td>
                        <td class="text-center" th:text="${r_order.depDateStr}"></td>
                        <td class="text-center" th:text="${r_order.quantity}"></td>
                        <td class="text-center" th:text="${r_order.totalPrice}"></td>
                        <td class="text-center" th:text="${r_order.oStatus}"></td>
                        <td align="center" valign="middle">
                           <!-- <a href="http://localhost:8280/orderdetail/get">
                                <button>详情</button>
                                encodeURI("http://localhost:8280/orderdetail/detail?" + oId);
                            </a>-->
                            <a class="ex2" th:href="@{'http://localhost:8280/orderdetail/detail?' + ${r_order.oId}}">查看详情
                                <!--<button>详情</button>-->
                            </a>
                        </td>
                    </tr>
                </table>
                <!-- </div>  -->
                <!-- </div> -->
                <div class="col-md">
                    <br>
                    <br>
                    <label style="float:right;"><a class="ex2" href="http://localhost:8280">返回首页</a></label>
                </div>
            </div>
        </div>
    </div>

    </br></br></br></br></br></br></br></br></br></br>
    <div class="col-md-12 text-center">
        <p style="color:white;" class="probootstrap_font-14">Copyright © 2019 . My Way 麦味 · 酒店订购</p>
    </div>
</section>
<!-- END section -->

<script src="/assets/js/jquery.min.js"></script>

<script src="/assets/js/popper.min.js"></script>
<script src="/assets/js/bootstrap.min.js"></script>
<script src="/assets/js/owl.carousel.min.js"></script>

<script src="/assets/js/jquery.waypoints.min.js"></script>
<script src="/assets/js/jquery.easing.1.3.js"></script>

<script src="/assets/js/select2.min.js"></script>

<script src="/assets/js/main.js"></script>
</body>
</html>